setting multiple css using dom

51

document.getElementById("myElement").style.cssText = "display: block; position: absolute";
Object.assign(yourelement.style,{fontsize:"12px",left:"200px",top:"100px"});

Comments

Submit
0 Comments